{# empty Twig template #}
{% extends'CNAMActimanBundle::layoutBody.html.twig' %}
{% block body %}

    {% block content %}
        <div class="row">
            <ul class="breadcrumb" style="margin-bottom: 5px;">
                <li>
                    Vous êtes ici :  
                </li>
                <li>
                    <a href="#">Gestion procédures</a>  
                </li>
                <li>
                    <a href="#">Liste des procédures</a>  
                </li>
                <li>
                    <a href="#">Détail</a>  
                </li>
                <li>
                    <a href="#">Modifier</a>  
                </li>
            </ul>
        <div class="col-lg-12">
            <h2>{{ Procedure.nomProcedure }}</h2>         
            <h3>Responsable : {{ Procedure.user.nomUser }}</h3>
            <h3>{{ Procedure.description }}</h3>
            <hr align="center" width="90%" size="5">
            <div class="col-lg-12">         
                    {%for Phase in Phases %}
                        <div class="panel panel-info">
                            <div class="panel-heading">{{ Phase.nomPhase }} - <td><a href="{{ path('cnam_actiman_procedure_phaseEdit', {'idpha': Phase.id}) }}">Editer</a> / <a onClick="return confirm('Voulez-vous vraiment supprimer cette phase ?');" href="{{ path('cnam_actiman_procedure_phaseDelete', {'idpha': Phase.id}) }}">Suprimer</a></td></div>                       
                            <div class="panel-body">   
                                <table class="table table-bordered table-hover tablesorter"> 
                                    {% for Operations in Operations %}
                                        {% if Operations.phase == Phase %}
                                            <tr>
                                                <td width="85%">{{Operations.nomOperation}}</td>
                                                <td><center><a href="{{ path('cnam_actiman_procedure_operationEdit', {'idop': Operations.id}) }}">Editer</a> / <a onClick="return confirm('Voulez-vous vraiment supprimer cette opération ?');" href="{{ path('cnam_actiman_procedure_operationDelete', {'idop': Operations.id}) }}">Suprimer</a></center></td>
                                            </tr>
                                        {% endif %}
                                    {% endfor %}     
                                </table>
                                <a href="{{ path('cnam_actiman_procedure_operationAdd', {'idpha':Phase.id}) }}" class="btn btn-info btn-sm">Ajouter une opération</a>
                            </div> 
                        </div>                       
                    {% else %}
                        <h4>Pas de phase trouvée</h4>         
                    {% endfor %}
                    <br/><a href="{{ path('cnam_actiman_procedure_phaseAdd', {'idpro':Procedure.id}) }}" class="btn btn-primary">Ajouter une phase</a>
                </div>
            </div>
        </div>
    {% endblock%}
        
{% endblock%}
